package springstudy.condition;

import org.springframework.context.annotation.Conditional;

import java.lang.annotation.*;

/**
 * java 系统属性条件判断
 * ConditionalOn其实是Spring 4里面的Conditional注解的扩展，
 * @Author acy
 * @Date 2019/04/24
 */
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Conditional(OnSystemPropertyCondition.class)
public @interface ConditionalOnSystemProperty {
	/**
	 * java 系统属性名称
	 * @return
	 */
	String name() default "";

	/**
	 * java系统属性值
	 * @return
	 */
	String value() default "";
}
